package PTA;
import java.util.*;
/*

//7-1 设计一个矩形类Rectangle
public class xt10_7_1 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        double c1, h1;
        c1 = sc.nextDouble();
        h1 = sc.nextDouble();
        Rectangle t1 = new Rectangle(c1, h1);

        double c2, h2;
        c2 = sc.nextDouble();
        h2 = sc.nextDouble();
        Rectangle t2 = new Rectangle(c2, h2);
//
//        System.out.printf("%.1f %.1f %.1f %.1f\n", c1, h1, re1.getArea(), re1.getPerimeter());
//        System.out.printf("%.1f %.1f %.14f %.1f\n", c2, h2, re2.getArea(), re2.getPerimeter());
        System.out.println(t1.getWidth()+" "+t1.getHeight()+" "+t1.getArea()+" "+t1.getPerimeter());
        System.out.println(+t2.getWidth()+" "+t2.getHeight()+" "+t2.getArea()+" "+t2.getPerimeter());



    }
}

class Rectangle {
    private double width;
    private double height;

    public Rectangle(){ //无参构造
        this.width = 1;
        this.height = 1;
    }
    public Rectangle(double r, double h){//有参构造
        this.width = r;
        this.height = h;
    }
    public double getWidth()
    {
        return width;
    }
    public double getHeight()
    {
        return height;
    }

    public double getArea(){ //面积
        return width * height;
    }
    public double getPerimeter(){ //周长
        return 2 * (width + height);
    }
}*/
